package ModelImplementation

import "salary-paymment/Model"

type DirectMethod struct {
	Model.PaymentMethod
	itsBank string
	itsAccount string
}

func NewDirectMethod(bank string, account string) *DirectMethod {
	return &DirectMethod{
		itsBank : bank,
		itsAccount : account,
	}
}

func (d *DirectMethod) GetAccount() string {
	return d.itsAccount
}

func (d *DirectMethod) GetBank() string {
	return d.itsBank
}

//实现PaymentMethod中的Pay方法
func (d DirectMethod)Pay(pc Model.Paycheck)  {
	pc.SetFields("Disposition","Direct")
}